package com.examsystem.dao;


import com.examsystem.pojo.PaperClass;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;

/**
 * @author fire'ge
 */
@Mapper
public interface PaperClassMapper {

    /*
    学生端
     */

    /**添加一个PaperClass
     * @param paperClass 传入paperClass类
     * @return int
     */
    int addPaperClass(PaperClass paperClass);
    /**根据id删除一个PaperClass
     * @param id 传入id
     * @return int
     */
    int deletePaperClassById(int id);

    /**更新PaperClass
     * @param paperClass 传入paperClass类
     * @return int
     */
    int updatePaperClass(PaperClass paperClass);
    /**根据id查询,返回一个PaperClass
     * @param id 传入id
     * @return int
     */
    PaperClass queryPaperClassById(int id);
    /**根据id查询,返回一个PaperClass
     * @param paperId 传入paperId
     * @param userId 传入userId
     * @return int
     */
    PaperClass queryPaperClassByClassPaperId(@Param("pcPaper") int paperId, @Param("userId") int userId);
    /**查询全部PaperClass,返回list集合
     * @return List<PaperClass>
     */
    List<PaperClass> queryAllPaperClass();
    /**查询全部PaperClass,返回list集合
     * @return List<PaperClass>
     */
    List<PaperClass> queryPaperClassByLessCurrentTime(Timestamp timestamp);

}
